<template>
  <el-image-viewer
    v-if="isVisible"
    :url-list="imgUrl"
    @close="isVisible = false"
  />
  <slot></slot>
</template>
<script setup>
import { computed } from "vue";
const emits = defineEmits(["update:modelValue"]);
const props = defineProps({
  modelValue: {
    type: Boolean,
    default: false,
  },
  imgUrl: {
    type: Array,
    default: () => {
      return {};
    },
  },
});
const isVisible = computed({
  get() {
    return props.modelValue;
  },
  set(val) {
    emits("update:modelValue", val);
  },
});
</script>
